<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<script>
    function show(){
    var Digital=new Date();
    var hours=Digital.getHours();
    var minutes=Digital.getMinutes();
    var seconds=Digital.getSeconds();
    document.Tick.Clock.value= hours+":"+minutes+":"
    +seconds+" ";
    setTimeout("show()",1000);
    {
    window.onload=show;
    <--//
</script>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>A Very Warmth Welcome</title>
    </head>
    <body>
        <h1>A Very Warmth Welcome!</h1>
        <form name="Tick">
            Client Side Time is: <input type="text" size="11" name="Clock">
        </form>
        <form method="POST" action="p1ex2.jsp?sayHello=true">
            Student Name: <input type="text" name="name" value="" width="20"
                                 /><br><br>
            <input type="submit" value="Get Server Side Time" />
        </form>
        <jsp:useBean id="now" class="java.util.Date" />
        <c:if test="${param.sayHello}">
            <!-- Let's welcome the user ${param.name} -->
            Hello ${param.name}!<br>
            <br>Server Side Time now is:
            <br />
            <!--Access object now to get the HOUR  -->
            Current hour: ${now.hours}<br/>
            <!--Access object now to get the HOUR  -->
            Current mins: ${now.minutes}<br/>
            <!--Access object now to get the HOUR  -->
            Current Seconds: ${now.seconds}<br/>
        </c:if>
    </body>
</html>